/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.dataInterface;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.shs.entity.mydata.ShsMydata;
import com.thinkgem.jeesite.modules.shs.service.mydata.ShsMydataService;

/**
 * 首页
 * 
 * @author lj
 * @version 2017-11-24
 */
@Controller
@RequestMapping(value = "")
public class IndexController extends BaseController {
	@Autowired ShsMydataService shsMydataService;

	//我要数据提交
	@RequestMapping(value = "submitMyData")
	@ResponseBody
	public Map<String,Object> submitMyData(ShsMydata shsMydata,HttpServletRequest request, HttpServletResponse response,String id) {
		  response.setHeader("Access-Control-Allow-Origin", "*");  
		  
		return shsMydataService.submitMyData(shsMydata);
	}
	//我要数据提交
	@RequestMapping(value = "countMyData")
	@ResponseBody
	public Map<String,Object> countMyData(HttpServletRequest request, HttpServletResponse response,String id) {
		response.setHeader("Access-Control-Allow-Origin", "*");  
		
		return shsMydataService.countMyData();
	}

}
